unit uChangeReport;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Mask, DBCtrlsEh, DBLookupEh, ExtCtrls;

type
  TfChangeReport = class(TForm)
    GroupBox1: TGroupBox;
    DBLookupComboboxEh1: TDBLookupComboboxEh;
    Panel1: TPanel;
    Bevel1: TBevel;
    Panel2: TPanel;
    Button3: TButton;
    Button4: TButton;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
  end;

var
  fChangeReport: TfChangeReport;

implementation

uses uDBData;

{$R *.dfm}

procedure TfChangeReport.Button2Click(Sender: TObject);
begin
  Close();
end;

procedure TfChangeReport.Button1Click(Sender: TObject);
begin
  if(not fDBData.dReport.DataSet.IsEmpty)then
  begin
    fDBData.frxMainReport.LoadFromFile(fDBData.frxMainDesigner.OpenDir + fDBData.dReport.DataSet.FieldByName('FileName').AsString);
    fDBData.frxMainReport.ShowReport();
  end;
  Close();
end;

end.
